<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<link rel="stylesheet" type="text/css" href="${ctxStatic}/easyui/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="${ctxStatic}/easyui/themes/icon.css">
<script type="text/javascript" src="${ctxStatic}/easyui/jquery.min.js"></script>
<script type="text/javascript" src="${ctxStatic}/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${ctxStatic}/easyui/locale/easyui-lang-zh_CN.js"></script>
<script>
    $.extend($.fn.validatebox.defaults.rules, {
        maxLength: {
            validator: function(value, param){
                return value.length <= param[0];
            },
            message: '长度不可超过{0}个字符'
        }
    });
    $.extend($.fn.validatebox.defaults.rules, {
        minSelect: {
            validator: function(value,param){//param[0] 是selector、param[1]是最小限值
                return $(param[0]).size() >= param[1];
            },
            message: '必须选择{1}个以上'
        }
    });
    var msger = {
        tip: function (msg) {
            $.messager.show({
                title: '温馨提示',
                msg: msg,
                timeout: 5000,
                showType: 'slide',
                height:120
            });
        },
        success: function (msg, callback) {
            $.messager.alert("提示", msg, 'info', callback)
        },
        err: function (msg, callback) {
            $.messager.alert("错误", msg, 'error', callback)
        }
    }
</script>